#define _CRT_SECURE_NO_WARNINGS 1


//541. 反转字符串||
class Solution {
public:
    string reverseStr(string s, int k)
    {
        int i = 0;
        int sz = s.size();
        for (i = 0; i < s.size(); i += 2 * k)
        {
            reverse(s.begin() + i, s.begin() + min(i + k, sz));
        }
        return s;
    }
};